pkfanonfandomcom-20200213-history
Pikifen/Quick creator guides
This page contains quick guides that teach you the basics on how to create content for Pikifen. Read this for a list of more in-depth and complete guides. Areas Concepts An area's physical geometry is made up of neighboring s, which represent floor'''s when seen from above. Their height can also be changed, and a polygon with a higher height than its neighbor creates a '''wall. How to make an area Feel free to check or copy the existing areas for references and ideas. # Open the game, enter the area editor. # Use the big button on the right to create your area. # Use the "Info" mode to give it a name. # Use the "Layout" mode to create and edit the polygons (also called sectors). #* Drag a polygon's vertexes around to give it shape. #* Double click a polygon's lines to create a new vertex. #* Use the "+" button on the panel to start drawing a new sector. #* Drag a vertex into another to merge the two. Connect edges to stitch them. #* Edges between higher sectors to lower ones make walls. # Use the "Objects" mode to create and edit the level's objects. # Use the "Paths" mode to create and edit the Pikmin's paths, by drawing the path stops and links between them. # Use the "Details" mode to create and edit tree shadows. Further info * On the area editor, right-click-drag moves the camera. * Objects will walk up floors within 50 units of each other. Use this for ramps and staircases. * Bridges need to be inside sectors of the "Bridge" type. Neighboring "Bridge"-type sectors will be used for the finished bridge's layout. * Don't overlap lines or create non-simple polygons. Full area guide: Creating areas Object types Concepts Red Pikmin is a type of Pikmin, Wollywog is a type of enemy, Captain Olimar is a type of leader, and wood bridge is a type of bridge. You then place in an area several instances of Wollywog, several instances of wood bridge, (hopefully) one instance of Captain Olimar, etc. Each type has its own properties (color, health, script, etc.) How to create an object type Feel free to check or copy the existing object types for references and ideas. # Create a folder for your object's type in Game_data/Types/. # Inside, create Data.txt. # Inside, write the necessary attributes, which take on the format attribute = value, one per line. #* name, height, max_carriers, max_health, move_speed, pushable, pushes, radius, rotation_speed, weight. # Depending on the category, you must also add some more attributes; check the corresponding category article in the list of object categories. # Create and set up the animations for it. Further info * Your object may also need a script; check if it does in the list of object categories. * The "Custom" category is for fully custom objects. These too need a script. Full object type guide: Creating object types Animations Concepts Animations are made up of that are displayed in rapid succession. Each frame has a sprite, and info about how long it lasts. The engine reads sprites from sections of one or more images (called spritesheets). Besides the image, each sprite has hitboxes, which are connected to body parts (e.g. body, head, tail, etc.), and define whether that body part is currently damageable, causing damage, or being ignored. These hit"boxes" are actually cylinders. How to create animations Feel free to check or copy existing animations and images for references and ideas. # Create the images that will be used for the object's sprites. In every sprite's image, the object must be facing the right. # Open the game, enter the animation editor. # Use the big button on the right to load the object type whose animations you want to edit. Create its folder in Game_data/Types/ if it doesn't exist. # Use the "Edit body parts" mode to create and edit the list of relevant body parts. # Use the "Edit sprites" mode to create and edit the sprites to be used in future animations's frames. #* Use the big button at the top to select a sprite or create a new one. #* Use the "Edit hitboxes" button to specify where each body part's hitbox is and what it does. They can be dragged around and resized with the left mouse button. # Use the "Edit animations" mode to create and edit the animations. #* Use the big button at the top to select an animation or create a new one. # Create the necessary animations for the type of object. To know which ones you need, check the corresponding category article from the list of object categories. Further info * On the animation editor, right-click-drag moves the camera. * When making animations for Pikmin, use the "Edit Pikmin top" button on an animation's data to specify where the leaf/bud/flower is on that frame. Full animation guide: Creating animations Scripts Concepts Scripts use an event-driven . An object is always in one of several states (e.g. sleeping, going home, biting). In this state, it can respond to a series of events (e.g. when it sees a Pikmin, when it reaches its home, when it loses health). Its response consists of a list of actions (e.g. changing animation, changing state, swallowing Pikmin in its mouth, walk somewhere). Only enemies and custom objects use the scripting feature. How to create a script Feel free to check or copy existing scripts for references and ideas. It is recommended to create the object you want before writing the script. # Go to Game_data/Types//. # Inside, create a file called Script.txt. # Inside, add a script block. This means one line has script {, and another has }. # Inside the script block, create a block for the name of a state. # Inside a state's block, create a block for an event. See here for a list of events. # Inside an event's block, write one action per line. See here for a list of action. # In the same file, add the first_state attribute, which specifies what the starting state is, and death_state, which is the state to go to when the health reches zero. # In Data.txt in the same folder, next to the existing object attributes, add the following attributes: #* territory_radius. #* reaches, which is a block with named "reaches". Each reach uses the format (the latter two are optional). Further info * To chase after an object, it must first be focused on. * For an enemy to eat, it must first set how many Pikmin can be grabbed at max, and which body parts will do the grabbing. After some Pikmin are grabbed, it must then swallow them, which is what really kills them. * When an enemy dies, it should run the start_dying and later, finish_dying actions. * An enemy can keep a list of variables with any name you wish, and these variables can contain any value you want. * When switching states, the action that switches the state should be the last one run on the event's code. Full script guide: Object script Category:Pikifen